package com.snow.campuslink.user.test;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author Gaosl
 * @className InfoReceiver
 * @date 2021/3/7 18:37
 */
@Component
@RabbitListener(
        bindings=@QueueBinding(
                value=@Queue(value="log.info",autoDelete="false"),
                exchange=@Exchange(value="log.direct",type= ExchangeTypes.DIRECT),
                key="log.info.routing.key"
        )
)
public class InfoReceiver {
    @RabbitHandler
    public void process(String msg){
        System.out.println("Info........receiver: "+msg);
    }
}
